#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author   : Uyynot
# @Email    : uyynot@qq.com
# @Time     : 2025/7/18 15:02
# @File     : g.py
# @Project  : demoProject
# @Desc     :
from concurrent.futures import ThreadPoolExecutor

import requests

sample_docs=[
  {
    "question": "西装品类",
    "answer": "西装品类"
  },
  {
    "question": "跑步服品类",
    "answer": "跑步服品类",
  },
  {
    "question": "男装品类",
    "answer": "男装品类",
  },
  {
    "question": "西游记",
    "answer": "西游记"
  },
  {
    "question": "MAIA 玛伊娅玛娅 MAIA ACTIVE",
    "answer": "MAIA 玛伊娅玛娅 MAIA ACTIVE",
  },
  {
    "question": "斐乐品牌",
    "answer": "斐乐品牌",
  },
  {
    "question": "天猫平台",
    "answer": "天猫平台",
  },
  {
    "question": "小野和子品牌",
    "answer": "小野和子品牌",
  },
  {
    "question": "阿里 ali tm 天猫 淘宝 tb",
    "answer": "阿里 ali tm 天猫 淘宝 tb",
  },
  {
    "question": "厦门中山路巴黎春天旗舰店",
    "answer": "厦门中山路巴黎春天旗舰店",
  },
  {
    "question": "巴黎的春天",
    "answer": "巴黎的春天",
  },
  {
    "question": "萨洛蒙品牌名称： SALOMON/萨洛蒙",
    "answer": "萨洛蒙品牌名称： SALOMON/萨洛蒙",
  },
  {
    "question": "露露品牌名称： lululemon",
    "answer": "露露品牌名称： lululemon",
  },
  {
    "question": "硬糖鞋 糖豆鞋 品类",
    "answer": "硬糖鞋 糖豆鞋 品类",
  },
  {
    "question": "母婴鞋",
    "answer": "母婴鞋",
  },
  {
    "question": "鬼冢虎品牌",
    "answer": "鬼冢虎品牌",
  }
]

# 请求的 URL
url = "http://genbim-genbi-c8nytehogcce-375297461.cn-northwest-1.elb.amazonaws.com.cn:8088/index/docs"


for item in sample_docs:
    item['profile_name'] = '行业洞察'
    item['index_name'] = 'test_hybrid'
    print(item)
    response = requests.post(url, json=item)
    print(response.headers.get('x-trace-id'), response.text)

